var update_url = "http://www.jice360.com/kiner/y.js";
var ui_locale = 'zh_CN';
var default_img = 'http://www.baidu.com//favicon.ico';
var urlImg = "http://www.jice360.com/kiner/";
var _config = {
    version: 100,
    lang: "en",
    skins: {
        skin_cloud: {
            style: {},
            csspath: "",
            icon: ""
        },
        skin_local: {
            style: {},
            csspath: "",
            icon: ""
        }
    },
    style: {
        bodyBackground: {
            "background": "-webkit-gradient(linear, 0% 0%, 0% 100%, from(#0866A4), to(#4DA9E8))"
        },
        background: {
            "background-repeat": "no-repeat",
            "background-position": "center",
            "-webkit-background-size": "",
            "-webkit-transform": ""
        }
    },
    skin: "",
    dialBoxNum: 8,
    dialBoxOpacity: 1,
    dialBoxSpacing: 30,
    dialBoxWidth: 214,
    dialBoxHeight: false,
    dialBoxRadius: 16,
    dialBoxPage: 1,
    toolSwitch: false,
    toolsBoxSwitch: false,
    searchSwitch: false,
    calendarSwitch: false,
    ipSwitch: false,
    weatherSwitch: false,
    openSwitch: true,
    targetSwitch: false,
    helpSwitch: true,
    dialBoxTitleSwitch: false,
    appSwitch: true,
    userSwitch: false,
    dialBoxPageSwitcher: true,
    dialBoxCreateBoxSwitch: false,
    hotQueue: ['skins'],
    bookMarksOpenQueue: [],
    oauthid: "",
    oauthData: {},
    curTab: "home",
    searchType: "",
    city: "",
    passwd: "",
    msgid: "0",
    OTime: 0
};

var _configList = {
    zh_CN: {
        lang: "zh_CN",
        dialBoxes: {
            webSite: [
			{
				"type" : 0, 
                "title": "谷歌",
                "url": "www.google.com.hk"
            },
            {       
				"type" : 0, 	
                "title": "百度",
                "url": "www.baidu.com"
            },
            {
				"type" : 1,            	
                "title": "第一财经视频",
                "url": "www.yicai.com/video"
            },
            {
				"type" : 1,             	
                "title": "CNTV",
                "url": "www.cntv.cn"
            },
            {
				"type" : 1,              	
                "title": "财新网",
                "url": "www.caixin.com"
            },
            {
				"type" : 1,              	
                "title": "和讯视频",
                "url": "tv.hexun.com"
            },
            {
				"type" : 1,              	
                "title": "腾讯视频",
                "url": "v.qq.com"
            },
            {
				"type" : 1,              	
                "title": "新浪视频",
                "url": "video.sina.com.cn"
            },
            {
				"type" : 1,              	
                "title": "凤凰视频",
                "url": "v.ifeng.com"
            },
            {
				"type" : 2,              	
                "title": "腾讯微博",
                "url": "t.qq.com"
            },
            {
				"type" : 2,               	
                "title": "新浪微博",
                "url": "www.weibo.com"
            },
            {
				"type" : 2,               	
                "title": "搜狐微博",
                "url": "t.sohu.com"
            },
            {
				"type" : 2,               	
                "title": "网易微博",
                "url": "t.163.com"
            },
            {
				"type" : 2,               	
                "title": "涨乐微博",
                "url": "t.zhangle.com"
            },
            {
				"type" : 2,   
                "title": "搜牛微博",
                "url": "search.10jqka.com.cn/channel/weibo"
            },
            {
				"type" : 2,              	
                "title": "和讯微博",
                "url": "t.hexun.com"
            },
            {
            	"type" : 3,            	
                "title": "第一财经",
                "url": "www.yicai.com"
            },
            {
            	"type" : 3,            	
                "title": "和讯网",
                "url": "www.hexun.com"
            },
            {
            	"type" : 3,            	
                "title": "凤凰网",
                "url": "www.ifeng.com"
            },
			{
            	"type" : 3,            	
                "title": "腾讯财经",
                "url": "finance.qq.com"
            },
            {
            	"type" : 3,
                "title": "新浪财经",
                "url": "finance.sina.com.cn"
            },
            {
            	"type" : 3,            	
                "title": "搜狐财经",
                "url": "business.sohu.com"
            },
            {
            	"type" : 3,
                "title": "网易财经",
                "url": "money.163.com"
            },
            {
            	"type" : 3,
                "title": "全景网",
                "url": "www.p5w.net"
            },
            {
            	"type" : 3,
                "title": "华尔街日报中文",
                "url": "cn.wsj.com/gb"
            },
			{
            	"type" : 3,
                "title": "FT中文",
                "url": "www.ftchinese.com"
            },
			{
				"type" : 4,
                "title": "淘股吧",
                "url": "www.taoguba.com.cn"
			},
			{
				"type" : 4,
                "title": "东方财富吧",
                "url": "guba.eastmoney.com"
			},
			{
				"type" : 4,
                "title": "和讯股吧",
                "url": "guba.hexun.com"
			},
            {
            	"type" : 5,
                "title": "工商银行",
                "url": "www.icbc.com.cn"
            },
            {
            	"type" : 5,
                "title": "建设银行",
                "url": "www.ccb.com"
            },
            {
            	"type" : 5,
                "title": "中国银行",
                "url": "www.bank-of-china.com"
            },
            {
            	"type" : 5,
                "title": "交通银行",
                "url": "www.bankcomm.com"
            },
            {
            	"type" : 6,
                "title": "农业银行",
                "url": "www.abchina.com"
            },
			{
            	"type" : 6,
                "title": "招商银行",
                "url": "www.cmbchina.com"
            },
            {
            	"type" : 6,
                "title": "中信银行",
                "url": "bank.ecitic.com"
            },
            {
            	"type" : 6,
                "title": "浦发银行",
                "url": "www.spdb.com.cn"
            },
            {
            	"type" : 6,
                "title": "光大银行",
                "url": "www.cebbank.com"
            },
            {
            	"type" : 6,
                "title": "兴业银行",
                "url": "www.cib.com.cn"
            },
			{
            	"type" : 6,
                "title": "民生银行",
                "url": "www.cmbc.com.cn"
            },
            {
            	"type" : 6,
                "title": "平安银行",
                "url": "bank.pingan.com"
            },
			{
            	"type" : 6,
                "title": "支付宝",
                "url": "www.alipay.com"
            },
			{
            	"type" : 6,
                "title": "财富通",
                "url": "www.tenpay.com"
            },
			{
            	"type" : 6,
                "title": "快钱",
                "url": "www.99bill.com"
            },
            {
            	"type" : 6,
                "title": "亚马逊",
                "url": "www.amazon.cn"
            },
            {
            	"type" : 6,
                "title": "当当网",
                "url": "www.dangdang.com"
            },
            {
            	"type" : 6,
                "title": "网上书城",
                "url": "www.99read.com"
            }],
            app: [{
                "id": "webstore",
                "title": getI18nMsg('appChromeWebStore'),
                "url": "https://chrome.google.com/webstore?hl=zh-CN",
                "img": default_img
            }]
        }
    }
};

var favicons = {
    "www.google.com.hk": {
        "rgb": "0,0,255"
    },
    "www.baidu.com": {
        "rgb": "22,105,250"
    },
    "www.yicai.com": {
		"ico": "http://www.yicai.com/sites/default/files/shark_favicon.ico",
        "rgb": "243,1,1"
    },
    "www.cntv.cn": {
        "rgb": "244,11,24"
    },
    "www.caixin.com": {
        "rgb": "232,70,8"
    },
    "www.hexun.com": {
        "rgb": "233,153,38"
    },
	"tv.hexun.com": {
        "rgb": "244,142,9"
    },
    "v.qq.com": {
        "rgb": "244,142,9"
    },
    "video.sina.com.cn": {
        "rgb": "0,148,105"
    },
    "v.ifeng.com": {
        "rgb": "191,0,0"
    },
    "t.qq.com": {
        "rgb": "222,77,58"
    },
    "www.weibo.com": {
        "rgb": "232,70,8"
    },
    "t.sohu.com": {
        "rgb": "153,28,28"
    },
    "t.163.com": {
        "rgb": "251,86,0"
    },
    "t.zhangle.com": {
        "rgb": "130,169,13"
    },
    "search.10jqka.com.cn": {
		"ico": "http://www.jice360.com/kiner/app/default_icon.ico",
        "rgb": "0,93,172"
    },
	"t.hexun.com": {
        "rgb": "244,142,9"
    },
    "www.ifeng.com": {
        "rgb": "0,148,105"
    },
    "finance.qq.com": {
        "rgb": "191,0,0"
    },
    "finance.sina.com.cn": {
        "rgb": "222,77,58"
    },
    "business.sohu.com": {
        "rgb": "232,70,8"
    },
    "money.163.com": {
        "rgb": "153,28,28"
    },
    "www.p5w.net": {
        "rgb": "251,86,0"
    },
    "cn.wsj.com": {
        "rgb": "130,169,13"
    },
    "www.ftchinese.com": {
        "rgb": "0,93,172"
    },
	"www.taoguba.com.cn": {
		"ico": "http://img.taoguba.com.cn/favicon.ico",
        "rgb": "0,93,172"
    },
	"guba.eastmoney.com": {
        "rgb": "0,93,172"
    },
	"guba.hexun.com": {
        "rgb": "0,93,172"
    },
	"www.icbc.com.cn": {
		"ico": "http://www.jice360.com/kiner/app/default_icon.ico",
        "rgb": "244,142,9"
    },
    "www.ccb.com": {
        "rgb": "0,148,105"
    },
    "www.bank-of-china.com": {
        "rgb": "191,0,0"
    },
    "www.bankcomm.com": {
		"ico": "http://www.jice360.com/kiner/app/default_icon.ico",
        "rgb": "222,77,58"
    },
    "www.abchina.com": {
        "rgb": "232,70,8"
    },
    "www.cmbchina.com": {
        "rgb": "153,28,28"
    },
    "bank.ecitic.com": {
		"ico": "http://www.jice360.com/kiner/app/default_icon.ico",
        "rgb": "251,86,0"
    },
    "www.spdb.com.cn": {
        "rgb": "130,169,13"
    },
    "www.cebbank.com": {
        "rgb": "0,93,172"
    },
	"www.cib.com.cn": {
		"ico": "http://www.jice360.com/kiner/app/default_icon.ico",
        "rgb": "244,142,9"
    },
    "www.cmbc.com.cn": {
        "rgb": "0,148,105"
    },
    "bank.pingan.com": {
        "rgb": "191,0,0"
    },
    "www.alipay.com": {
        "rgb": "222,77,58"
    },
	"www.tenpay.com": {
        "rgb": "222,77,58"
    },
	"www.99bill.com": {
		"ico": "http://www.jice360.com/kiner/app/default_icon.ico",
        "rgb": "222,77,58"
    },
    "www.amazon.cn": {
        "rgb": "232,70,8"
    },
    "www.dangdang.com": {
        "rgb": "153,28,28"
    },
    "www.99read.com": {
		"ico": "http://www.jice360.com/kiner/app/default_icon.ico",
        "rgb": "251,86,0"
    }
};

var config = _configList[ui_locale];
if (typeof config != 'undefined') {
    $.each(config,function(i, n) {
        _config[i] = n
    })
}


var _screenArrangementList = {
	    "default": {
	        "narrow": {
	            'small': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.1
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.05,
	                    'heightBlank': 0.18
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.1
	                },
	                '16': {
	                    'cols': 5,
	                    'rows': 4,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.02
	                }
	            },
	            'normal': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.2,
	                    'heightBlank': 0.1
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.05,
	                    'heightBlank': 0.22
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.15,
	                    'heightBlank': 0.16
	                },
	                '16': {
	                    'cols': 5,
	                    'rows': 4,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.02
	                }
	            }
	        },
	        "wide": {
	            'small': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.3,
	                    'heightBlank': 0.05
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.05
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.15,
	                    'heightBlank': 0.02
	                },
	                '16': {
	                    'cols': 5,
	                    'rows': 4,
	                    'widthBlank': 0.15,
	                    'heightBlank': 0.02
	                }
	            },
	            'normal': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.3,
	                    'heightBlank': 0.1
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.1
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.05
	                },
	                '16': {
	                    'cols': 5,
	                    'rows': 4,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.05
	                }
	            }
	        }
	    },
	    "square": {
	        "narrow": {
	            'small': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.03
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.05
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.02
	                },
	                '16': {
	                    'cols': 5,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.08
	                },
	            },
	            'normal': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.05
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.15
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.05
	                },
	                '16': {
	                    'cols': 5,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.05
	                },
	            }
	        },
	        "wide": {
	            'small': {
	                '4': {
	                    'cols': 4,
	                    'rows': 1,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.28
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.04
	                },
	                '12': {
	                    'cols': 5,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.08
	                },
	                '16': {
	                    'cols': 7,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.08
	                }
	            },
	            'normal': {
	                '4': {
	                    'cols': 4,
	                    'rows': 1,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.32
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.05
	                },
	                '12': {
	                    'cols': 5,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.08
	                },
	                '16': {
	                    'cols': 7,
	                    'rows': 3,
	                    'widthBlank': 0.03,
	                    'heightBlank': 0.08
	                }
	            }
	        }
	    },
	    "seamless": {
	        "narrow": {
	            'small': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.35,
	                    'heightBlank': 0.2
	                },
	                '8': {
	                    'cols': 3,
	                    'rows': 3,
	                    'widthBlank': 0.35,
	                    'heightBlank': 0.1
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.2,
	                    'heightBlank': 0.15
	                },
	                '16': {
	                    'cols': 6,
	                    'rows': 4,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.15
	                }
	            },
	            'normal': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.35,
	                    'heightBlank': 0.2
	                },
	                '8': {
	                    'cols': 3,
	                    'rows': 3,
	                    'widthBlank': 0.35,
	                    'heightBlank': 0.1
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.2,
	                    'heightBlank': 0.15
	                },
	                '16': {
	                    'cols': 6,
	                    'rows': 4,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.15
	                }
	            }
	        },
	        "wide": {
	            'small': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.35,
	                    'heightBlank': 0.2
	                },
	                '8': {
	                    'cols': 4,
	                    'rows': 2,
	                    'widthBlank': 0.15,
	                    'heightBlank': 0.28
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.2,
	                    'heightBlank': 0.06
	                },
	                '16': {
	                    'cols': 6,
	                    'rows': 4,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.06
	                }
	            },
	            'normal': {
	                '4': {
	                    'cols': 2,
	                    'rows': 2,
	                    'widthBlank': 0.35,
	                    'heightBlank': 0.2
	                },
	                '8': {
	                    'cols': 3,
	                    'rows': 3,
	                    'widthBlank': 0.32,
	                    'heightBlank': 0.1
	                },
	                '12': {
	                    'cols': 4,
	                    'rows': 3,
	                    'widthBlank': 0.2,
	                    'heightBlank': 0.15
	                },
	                '16': {
	                    'cols': 6,
	                    'rows': 4,
	                    'widthBlank': 0.1,
	                    'heightBlank': 0.15
	                }
	            }
	        }
	    }
	};
var screenWidth = window.screen.width, screenHeight = window.screen.height; 
var dialboxSize = screenHeight > 900 ? 'normal': 'small';
var dialboxProportion = (screenWidth / screenHeight) > 1.4 ? 'wide': 'narrow'; 
if (typeof _screenArrangementList['default'][dialboxProportion][dialboxSize][_config['dialBoxNum']] != 'undefined') {
    var _DScreenArrangement = _screenArrangementList['default'][dialboxProportion][dialboxSize][_config['dialBoxNum']];
//    console.log(screenWidth);
//    console.log(_DScreenArrangement['cols']);
//    console.log(_config['dialBoxSpacing']);
//    console.log(_DScreenArrangement['cols']);
//    console.log(_DScreenArrangement['widthBlank']);
//    console.log(_DScreenArrangement['cols']);
   _config['dialBoxWidth'] = parseInt((screenWidth - ((_DScreenArrangement['cols'] + 3) * _config['dialBoxSpacing']) - (_DScreenArrangement['cols'] * 2 * 1) - parseInt(_DScreenArrangement['widthBlank'] * screenWidth)) / _DScreenArrangement['cols']);
   _config['dialBoxHeight'] = parseInt((screenHeight - ((_DScreenArrangement['rows'] + 3) * _config['dialBoxSpacing']) - (_DScreenArrangement['rows'] * 2 * 1) - parseInt(_DScreenArrangement['heightBlank'] * screenHeight) - 246) / _DScreenArrangement['rows'])
} 

var xhr = new XMLHttpRequest();
xhr.open("GET", update_url, true);
xhr.onreadystatechange = function() {
  if (xhr.readyState == 4) {
	  var x = JSON.parse(xhr.responseText);
	 
	 var localVersion = localStorage.lastVersion;
	 if(typeof localVersion == 'undefined') {
		 localVersion = 0;
	 } else {
		 localVersion = localStorage.lastVersion;
	 }

	 if(localVersion < x.v){
		 localStorage.dialBoxes = JSON.stringify(x.configList["zh_CN"].dialBoxes);
		 localStorage.lastVersion = x.v;
		 window.location.reload(false);
	 } 
  }
}
xhr.send();

var user = $.user();
var h5Storage = new $.h5Storage(),
	PDI = $.pdi(),
	myBox,
	oauthBox,
	version = "version",
	ver = _config.version,
	tabID = '',
	serverValue = [],
	protocol = 'chrome',
	setupDialog = '';
//replaceLocationDB();
$(function() {
    myBox = $('.appDialbox').dialbox({
        num: PDI.get('setup', 'dialBoxNum'),
        page: PDI.get('setup', 'dialBoxPage'),
        opacity: PDI.get('setup', 'dialBoxOpacity'),
        spacing: PDI.get('setup', 'dialBoxSpacing'),
        titleShow: PDI.get('setup', 'dialBoxTitleSwitch'),
        width: PDI.get('setup', 'dialBoxWidth'),
        height: PDI.get('setup', 'dialBoxHeight'),
        radius: PDI.get('setup', 'dialBoxRadius')    
    });
	$("body").css("background-image",PDI.get('setup', 'bgimage'));

	$('.dialBoxNum').bind('click', 
            function() {
                var type = 'default';
                myBox.num = parseInt($(this).text());
                myBox.spacing = myBox.num > 9 ? 15: 30;
                if ($(this).parent().hasClass('default')) {
                    myBox.titleShow = false;
                    myBox.radius = 10
                } else {
                    if ($(this).parent().hasClass('circular')) {
                        myBox.titleShow = true;
                        myBox.radius = 200;
                        type = "square"
                    } else if ($(this).parent().hasClass('square')) {
                        myBox.titleShow = true;
                        myBox.radius = 60;
                        type = "square"
                    } else if ($(this).parent().hasClass('seamless')) {
                        myBox.titleShow = false;
                        myBox.spacing = 0;
                        myBox.radius = 0;
                        type = "seamless"
                    }
                }
                var _screenArrangement = _screenArrangementList[type][dialboxProportion][dialboxSize][myBox.num];
                if (typeof _screenArrangement != 'undefined') {
                    myBox.widthBlank = _screenArrangement['widthBlank'];
                    myBox.heightBlank = _screenArrangement['heightBlank'];
                    myBox.adaptive(_screenArrangement['cols'], _screenArrangement['rows'], type)
                }
                PDI.set('setup', 'dialBoxNum', myBox.num);
                PDI.set('setup', 'dialBoxSpacing', myBox.spacing);
                PDI.set('setup', 'dialBoxWidth', myBox.width);
                PDI.set('setup', 'dialBoxHeight', parseInt(myBox.height - 32));
                PDI.set('setup', 'dialBoxRadius', myBox.radius);
                PDI.set('setup', 'dialBoxTitleSwitch', myBox.titleShow);
                myBox.init()
            });
	jQuery("li[id^='t_']").each(function(){
		jQuery(this).bind("click", function(){myBox.show_type=jQuery(this).attr("id").split("_")[1];myBox.init();});
	});

	jQuery("#skin > li > a").click(function(){
		jQuery("body").css("background-image",jQuery(this).children("img").attr("skin"));
		PDI.set('setup', "bgimage", jQuery(this).children("img").attr("skin"));
    });
	
	
	jQuery('#dvDockStart').mobilyblocks();
	
	jQuery("#layout").click(function(){
		jQuery("#setup").children(".topClose").hide().end().fadeIn("slow").css("left",(jQuery(document.body).width()/2)-200).children(".topClose").show();
	});
	jQuery("#setup > .topClose").live('click', function() {
		  jQuery("#setup").fadeOut("slow");
		});
	
    //下面工具栏定位
	jQuery('#navigation').stop().css("left",(jQuery(document.body).width()/2)-300);
	jQuery('#navigation span').stop().animate({'marginTop':'-2px'},1000);
	
	//工具栏鼠标效果
	jQuery('#navigation > li').hover(
		function () {
			jQuery('span',jQuery(this)).stop().animate({'marginTop':'-35px'},200).addClass("over").children("a").css("color","#ff5500");
		},
		function () {
			jQuery('span',jQuery(this)).stop().animate({'marginTop':'-2px'},200).removeClass("over").children("a").css("color","#0066cc");
		}
	);
});

//判断浏览器窗口大小
jQuery(window).resize(function() {
	var width = jQuery(this).width();
	jQuery('#navigation').stop().css("left",(jQuery(document.body).width()/2)-300);
	if(width<600){jQuery('#navigation').hide()}else{jQuery('#navigation').show()}
});